<%@ page import="java.util.function.Function" %>
<%@ page import="com.gmono.managers.Common" %>
Created by IntelliJ IDEA.
  User: cva
  Date: 18-12-28
  Time: 下午5:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    request.setCharacterEncoding("UTF-8");
    Function<String,String> get=s->request.getParameter(s);
    int fid= Integer.parseInt(get.apply("fid"));
//    Common.c.prepareStatement("insert into category (name, alias, describe, fid) values (?,?,?,?);")
    int res= Common.Update("insert into category (name, alias, describe, fid) values (?,?,?,?)",
            get.apply("name"),
            get.apply("alias"),
            get.apply("describe"),
            fid);
    out.print(res!=-1);
    String alert=res!=-1?"成功":"失败";
%>
<%@include file="/back.jsp"%>
